﻿package net.wangit.framework.i18n;

import net.wangit.util.Checker;

/**
 * 本地化工具类
 * 
 * @author watson Feb 22, 2010
 */
public class LocaleUtil {

	private LocaleUtil() {}

	/*
	 * 根据语言和国家代码，返回当地语言编码: 语言_国家代码
	 */
	public static String getLocaleString(String language, String country) {
		String localeString = "";
		if (!Checker.isEmpty(language)) {
			localeString = language;
			if (!Checker.isEmpty(country))
				localeString = localeString + "_" + country;
		}
		return localeString;
	}
}
